<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Waf\V20180125\Models;
use TencentCloud\Common\AbstractModel;

/**
 * DescribeSpartaProtectionInfo response structure.
 *
 * @method string getDomain() Obtain Domain name
 * @method void setDomain(string $Domain) Set Domain name
 * @method string getDomainId() Obtain Domain ID
 * @method void setDomainId(string $DomainId) Set Domain ID
 * @method string getCname() Obtain CNAME value
 * @method void setCname(string $Cname) Set CNAME value
 * @method string getStatus() Obtain Status
 * @method void setStatus(string $Status) Set Status
 * @method array getSrcList() Obtain Source IP address list
 * @method void setSrcList(array $SrcList) Set Source IP address list
 * @method string getCertType() Obtain Certificate type
 * @method void setCertType(string $CertType) Set Certificate type
 * @method string getCert() Obtain Certificate
 * @method void setCert(string $Cert) Set Certificate
 * @method string getPrivateKey() Obtain Private key
 * @method void setPrivateKey(string $PrivateKey) Set Private key
 * @method string getSslid() Obtain SSL ID
 * @method void setSslid(string $Sslid) Set SSL ID
 * @method string getIsCdn() Obtain Whether it is a CDN
 * @method void setIsCdn(string $IsCdn) Set Whether it is a CDN
 * @method array getGrayAreas() Obtain Grayscale area list
 * @method void setGrayAreas(array $GrayAreas) Set Grayscale area list
 * @method string getEngine() Obtain Engine
 * @method void setEngine(string $Engine) Set Engine
 * @method string getHttpsRewrite() Obtain HTTPS rewriting
 * @method void setHttpsRewrite(string $HttpsRewrite) Set HTTPS rewriting
 * @method string getUpstreamType() Obtain upstreamType value
 * @method void setUpstreamType(string $UpstreamType) Set upstreamType value
 * @method string getUpstreamDomain() Obtain Value of upstreamDomain
 * @method void setUpstreamDomain(string $UpstreamDomain) Set Value of upstreamDomain
 * @method string getUpstreamScheme() Obtain Value of upstreamScheme
 * @method void setUpstreamScheme(string $UpstreamScheme) Set Value of upstreamScheme
 * @method string getIsHttp2() Obtain Whether it is HTTP2.
 * @method void setIsHttp2(string $IsHttp2) Set Whether it is HTTP2.
 * @method string getIsWebsocket() Obtain Whether it includes WebSocket
 * @method void setIsWebsocket(string $IsWebsocket) Set Whether it includes WebSocket
 * @method string getLoadBalance() Obtain LoadBalance information
 * @method void setLoadBalance(string $LoadBalance) Set LoadBalance information
 * @method string getHttpsUpstreamPort() Obtain Value of httpsUpstreamPort
 * @method void setHttpsUpstreamPort(string $HttpsUpstreamPort) Set Value of httpsUpstreamPort
 * @method array getPorts() Obtain Port information
 * @method void setPorts(array $Ports) Set Port information
 * @method string getIsGray() Obtain Whether it is grayscale
 * @method void setIsGray(string $IsGray) Set Whether it is grayscale
 * @method string getMode() Obtain Mode
 * @method void setMode(string $Mode) Set Mode
 * @method string getLevel() Obtain Defense level: 100, 200, 300
 * @method void setLevel(string $Level) Set Defense level: 100, 200, 300
 * @method string getIsKeepAlive() Obtain Whether to maintain a long connection with the origin server
 * @method void setIsKeepAlive(string $IsKeepAlive) Set Whether to maintain a long connection with the origin server
 * @method string getAnycast() Obtain 0: BGP; 1: Anycast.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method void setAnycast(string $Anycast) Set 0: BGP; 1: Anycast.
Note: This field may return null, indicating that no valid values can be obtained.
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class DescribeSpartaProtectionInfoResponse extends AbstractModel
{
    /**
     * @var string Domain name
     */
    public $Domain;

    /**
     * @var string Domain ID
     */
    public $DomainId;

    /**
     * @var string CNAME value
     */
    public $Cname;

    /**
     * @var string Status
     */
    public $Status;

    /**
     * @var array Source IP address list
     */
    public $SrcList;

    /**
     * @var string Certificate type
     */
    public $CertType;

    /**
     * @var string Certificate
     */
    public $Cert;

    /**
     * @var string Private key
     */
    public $PrivateKey;

    /**
     * @var string SSL ID
     */
    public $Sslid;

    /**
     * @var string Whether it is a CDN
     */
    public $IsCdn;

    /**
     * @var array Grayscale area list
     */
    public $GrayAreas;

    /**
     * @var string Engine
     */
    public $Engine;

    /**
     * @var string HTTPS rewriting
     */
    public $HttpsRewrite;

    /**
     * @var string upstreamType value
     */
    public $UpstreamType;

    /**
     * @var string Value of upstreamDomain
     */
    public $UpstreamDomain;

    /**
     * @var string Value of upstreamScheme
     */
    public $UpstreamScheme;

    /**
     * @var string Whether it is HTTP2.
     */
    public $IsHttp2;

    /**
     * @var string Whether it includes WebSocket
     */
    public $IsWebsocket;

    /**
     * @var string LoadBalance information
     */
    public $LoadBalance;

    /**
     * @var string Value of httpsUpstreamPort
     */
    public $HttpsUpstreamPort;

    /**
     * @var array Port information
     */
    public $Ports;

    /**
     * @var string Whether it is grayscale
     */
    public $IsGray;

    /**
     * @var string Mode
     */
    public $Mode;

    /**
     * @var string Defense level: 100, 200, 300
     */
    public $Level;

    /**
     * @var string Whether to maintain a long connection with the origin server
     */
    public $IsKeepAlive;

    /**
     * @var string 0: BGP; 1: Anycast.
Note: This field may return null, indicating that no valid values can be obtained.
     */
    public $Anycast;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param string $Domain Domain name
     * @param string $DomainId Domain ID
     * @param string $Cname CNAME value
     * @param string $Status Status
     * @param array $SrcList Source IP address list
     * @param string $CertType Certificate type
     * @param string $Cert Certificate
     * @param string $PrivateKey Private key
     * @param string $Sslid SSL ID
     * @param string $IsCdn Whether it is a CDN
     * @param array $GrayAreas Grayscale area list
     * @param string $Engine Engine
     * @param string $HttpsRewrite HTTPS rewriting
     * @param string $UpstreamType upstreamType value
     * @param string $UpstreamDomain Value of upstreamDomain
     * @param string $UpstreamScheme Value of upstreamScheme
     * @param string $IsHttp2 Whether it is HTTP2.
     * @param string $IsWebsocket Whether it includes WebSocket
     * @param string $LoadBalance LoadBalance information
     * @param string $HttpsUpstreamPort Value of httpsUpstreamPort
     * @param array $Ports Port information
     * @param string $IsGray Whether it is grayscale
     * @param string $Mode Mode
     * @param string $Level Defense level: 100, 200, 300
     * @param string $IsKeepAlive Whether to maintain a long connection with the origin server
     * @param string $Anycast 0: BGP; 1: Anycast.
Note: This field may return null, indicating that no valid values can be obtained.
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("Domain",$param) and $param["Domain"] !== null) {
            $this->Domain = $param["Domain"];
        }

        if (array_key_exists("DomainId",$param) and $param["DomainId"] !== null) {
            $this->DomainId = $param["DomainId"];
        }

        if (array_key_exists("Cname",$param) and $param["Cname"] !== null) {
            $this->Cname = $param["Cname"];
        }

        if (array_key_exists("Status",$param) and $param["Status"] !== null) {
            $this->Status = $param["Status"];
        }

        if (array_key_exists("SrcList",$param) and $param["SrcList"] !== null) {
            $this->SrcList = $param["SrcList"];
        }

        if (array_key_exists("CertType",$param) and $param["CertType"] !== null) {
            $this->CertType = $param["CertType"];
        }

        if (array_key_exists("Cert",$param) and $param["Cert"] !== null) {
            $this->Cert = $param["Cert"];
        }

        if (array_key_exists("PrivateKey",$param) and $param["PrivateKey"] !== null) {
            $this->PrivateKey = $param["PrivateKey"];
        }

        if (array_key_exists("Sslid",$param) and $param["Sslid"] !== null) {
            $this->Sslid = $param["Sslid"];
        }

        if (array_key_exists("IsCdn",$param) and $param["IsCdn"] !== null) {
            $this->IsCdn = $param["IsCdn"];
        }

        if (array_key_exists("GrayAreas",$param) and $param["GrayAreas"] !== null) {
            $this->GrayAreas = $param["GrayAreas"];
        }

        if (array_key_exists("Engine",$param) and $param["Engine"] !== null) {
            $this->Engine = $param["Engine"];
        }

        if (array_key_exists("HttpsRewrite",$param) and $param["HttpsRewrite"] !== null) {
            $this->HttpsRewrite = $param["HttpsRewrite"];
        }

        if (array_key_exists("UpstreamType",$param) and $param["UpstreamType"] !== null) {
            $this->UpstreamType = $param["UpstreamType"];
        }

        if (array_key_exists("UpstreamDomain",$param) and $param["UpstreamDomain"] !== null) {
            $this->UpstreamDomain = $param["UpstreamDomain"];
        }

        if (array_key_exists("UpstreamScheme",$param) and $param["UpstreamScheme"] !== null) {
            $this->UpstreamScheme = $param["UpstreamScheme"];
        }

        if (array_key_exists("IsHttp2",$param) and $param["IsHttp2"] !== null) {
            $this->IsHttp2 = $param["IsHttp2"];
        }

        if (array_key_exists("IsWebsocket",$param) and $param["IsWebsocket"] !== null) {
            $this->IsWebsocket = $param["IsWebsocket"];
        }

        if (array_key_exists("LoadBalance",$param) and $param["LoadBalance"] !== null) {
            $this->LoadBalance = $param["LoadBalance"];
        }

        if (array_key_exists("HttpsUpstreamPort",$param) and $param["HttpsUpstreamPort"] !== null) {
            $this->HttpsUpstreamPort = $param["HttpsUpstreamPort"];
        }

        if (array_key_exists("Ports",$param) and $param["Ports"] !== null) {
            $this->Ports = [];
            foreach ($param["Ports"] as $key => $value){
                $obj = new PortItem();
                $obj->deserialize($value);
                array_push($this->Ports, $obj);
            }
        }

        if (array_key_exists("IsGray",$param) and $param["IsGray"] !== null) {
            $this->IsGray = $param["IsGray"];
        }

        if (array_key_exists("Mode",$param) and $param["Mode"] !== null) {
            $this->Mode = $param["Mode"];
        }

        if (array_key_exists("Level",$param) and $param["Level"] !== null) {
            $this->Level = $param["Level"];
        }

        if (array_key_exists("IsKeepAlive",$param) and $param["IsKeepAlive"] !== null) {
            $this->IsKeepAlive = $param["IsKeepAlive"];
        }

        if (array_key_exists("Anycast",$param) and $param["Anycast"] !== null) {
            $this->Anycast = $param["Anycast"];
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
